package com.baoteng.room.dao;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;

import com.baoteng.room.entity.TestRoomModel;


/**
 * Author: loren
 * Date: 2019/8/12
 */
@Dao
public abstract class TestRoomModelRepo extends BaseRepo<TestRoomModel> {

    private static final String QUERY_BY_NAME = "SELECT * FROM TestRoomModel WHERE name=:name";

    @Query(QUERY_BY_NAME)
    abstract public TestRoomModel query(String name);

    @Override
    protected String getTableName() {
        return this.getClass().getSimpleName();
    }
}
